/*
 * File:   Triangle.h
 * Author: matt
 *
 * Created on February 3, 2011, 7:45 PM
 */

#ifndef TRIANGLE_H
#define	TRIANGLE_H

#include "Surface.h"
#include "Shader.h"
#include "Box.h"

class Triangle: public Surface {
private:
    cs5721::Vector3D vertex1;
    cs5721::Vector3D vertex2;
    cs5721::Vector3D vertex3;
    cs5721::Vector3D normal;
    Shader* shader;
    Box bbox;

public:
    Triangle(double, double, double, double,
            double, double, double, double, double, Shader*);
    bool isHit(Ray&, double, double, Record&);
    cs5721::Vector3D getNormal(cs5721::Vector3D&);
    Box boundingBox();
    Shader* getShader();
    cs5721::Vector3D getColor();
    void print();
};


#endif	/* TRIANGLE_H */

